//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: global.h 757 2007-05-10 08:19:31Z roger $
//

#ifndef _GLOBAL_H
#define _GLOBAL_H

#include "unihan_property.h"
typedef struct {
	char *id;
	char *cname;
	char *icon;
#if NEW_PROPERTY
	UnihanProperty *propertyList;
#endif
} IMInfo;

typedef enum _UnihanTCSCMode {
        UNIHAN_TCSC_NO_CONV,
        UNIHAN_TCSC_TO_SIMP,
        UNIHAN_TCSC_TO_TRAD
} UnihanTCSCMode;

typedef struct {
        GList *imList;
        GList *imCurrList;
        IMInfo *currIM;
        gboolean fullwidth;
        gboolean puncce;
        UnihanTCSCMode tcsc;
		int language;
        gboolean tcscAvailable;
        gboolean unihanAvailable;
        gboolean puncMode;
#if 0
        GList *symbolList;
        GList *wordList;
#endif
#if NEW_PROPERTY
	void *prolist;
	int procount;
#endif
} StatusModel;

typedef struct _StatusControls {
	GtkWidget *hbox;          // the hbox for everything in the window
	GtkWidget *icon; 	// the Unihan icon on the left
	GtkWidget *iconbox;
	//GtkWidget *
 
	//GtkWidget *iconbox;
	GtkWidget *imLabel;       // input method label on button
	GtkWidget *imButton;      // input method selection button

	GtkWidget *imPix;
	GtkWidget *imbox;

	//GtkWidget *imbox;
	GtkWidget *widthLabel;    // fullwidth label on button
	GtkWidget *widthButton;   // fullwidth toggle button
#if NEW_PROPERTY
	GtkWidget *halfPix;
	GtkWidget *widthbox;
	GtkWidget *fullPix;
#endif
	GtkWidget *puncceLabel;   // punctuation label on button
	GtkWidget *punccebox;
	GtkWidget *puncceButton;  // punctuation button
	GtkWidget *tcscLabel;     // TC/SC label on button
	GtkWidget *tcscbox;
	GtkWidget *tcscButton; 	// TC/SC button
	GtkWidget *noconv;
	GtkWidget *tctosc;
	GtkWidget *sctotc;
	GtkWidget *punc_kbd_item;
	GtkWidget *us_kbd_item;
#if NEW_PROPERTY
	gchar *imname;
	char *halficonname;
	char *fulliconname;
#endif
#if NEW_PROPERTY
	GtkWidget *punccePix;
	GtkWidget *puncchPix;
	GtkWidget *propertyButton;
	GtkWidget *propertybox;
	GtkWidget *propertyLabel;
	GtkWidget *tcscItem;
	GtkWidget *softkbButton;  // soft keyboard toggle on button  
	GtkWidget *softkbLabel;   // soft keyboard label on button
	GtkWidget *statusenchButton;// status of english and chinese toggle button
	GtkWidget *statusenchLabel; // status label on button
#endif
} StatusControls;

typedef struct {
	StatusModel *model;
	StatusControls *controls;
	StatusControls *controls_floating;

	gboolean runAsApplet;
	gboolean doNotHide;
	GtkWidget *appletWindow;
	GtkWidget *appletFrame;

	GtkWidget *mainMenu;
	GtkWidget *tcscMenu;
	GtkWidget *imMenu;

#if NEW_PROPERTY
	GtkWidget *propertyMenu;
	GtkWidget *submenu;
#endif
} StatusWindow;


extern StatusModel *model;
extern StatusWindow *window;

extern GtkClipboard *prefedit_clipboard;

void send_to_engine(int int_count, int *ints, int str_count, char **strs);

#endif /* _GLOBAL_H */

// vi:ts=4:nowrap:cin:expandtab
